package cn.yuyiling.jelly.qa.api;


import cn.yuyiling.jelly.qa.dto.QuestionDetails;
import cn.yuyiling.jelly.qa.mongodb.entity.Question;
import java.util.List;

public interface QuestionService {

    Question createQuestion(Question question);
    Question updateQuestion(String id, Question updatedQuestion);
    Question likeQuestion(String id);
    Question dislikeQuestion(String id);
    void deleteQuestionAndRelatedData(String questionId);
    long getTotalQuestionCount();
    List<Question> getHottestQuestions(int limit);
    List<Question> getRecommendedQuestions(List<String> knowledgePoints);
    List<Question> getQuestionsByKnowledgePoint(String knowledgePoint);
    QuestionDetails getQuestionDetails(String questionId);

    void addKnowledgePoint(String id, String knowledgePoint);
    Question getQuestionById(String id);

    Question viewQuestionById(String id);
    public List<String> get24HourTopViewQuestion(int count);
    public void refreshTop24hViewQuestionRanking();


    Question likeQuestionById(String id);
    List<String> get24HourTopPopularQuestion(int count);
    void refreshTop24hPopularQuestionRanking();

    List<Question> findByKnowledgePointsIn(List<String> knowledgePoints);

}